<td width="564" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="f1" method="post" action="">
<table width="550" cellpadding="2" cellspacing="2">
	<tr>
		<td width="150"><b>Invoice Number</b></td>
		<td width="100"><b>Date</b></td>
		<td width="100"><b>Discount</b></td>
		<td width="100"><b>Tax</b></td>
		<td width="100"><b>Pay Amount</b></td>
	</tr>

</table>
<table>
	<?php if (!empty($payment)): ?>
				
				<?php foreach ($payment as $payment): ?>
				<?php $olddate = $payment['salesdate'];
					$newdata = date("d-M-Y",strtotime($olddate));
					
				?>	
					
					<tr width="550">
						
						<td width="150" class="fonttext"><?php print $payment['invoiceno']; ?></td>
						<td width="100" class="fonttext"><?php echo $newdata; ?></td>
						<td width="100" class="fonttext"><?php print number_format($payment['discount'],2); ?></td>
						<td width="100" class="fonttext"><?php print $payment['tax']; ?></td>
						<td width="100" class="fonttext"><?php print number_format($payment['paidamt'],2); ?></td>
						
					</tr>
			<?php endforeach; ?>
			<?php endif; ?>
</table>
</form>
            </table></td>

<td width="210" align="left" valign="top">
<?php $this->load->view('layout/rightsidebarreg');?>
</td></tr></table>
          